<#include "../common/layout.ftl"/>
<@layout>
<div width="100%">
	<div class="dxfsqd_title">公司充值信息</div>
	<div class="dxfsqd_shearch">
		<#if session.userRole == 'admin'>
			<a style="background:green;width: 130px;color: white;" href="/company/toAddMessage"><i class="icon-recharge icon-white"></i>添加公司充值信息</a>
			<button type="button" class="btn btn-info" onclick="javascript:history.back();">返回</button>
		</#if>
  </div>

<div class="dxfsqd_table">
	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
			<th scope="col">ID</th>
			<th scope="col">公司代码</th>
			<th scope="col">公司名称</th>
			<th scope="col">公司余额</th>
			<th  scope="col" style="width:380px;">充值信息</th>
			<th scope="col">信息录入人</th>
			<th scope="col">操作</th>
		  </tr>
		</thead>
		<tbody>
		<#list page.list as tmp>
		  <#if session.company == tmp.company || session.userRole == 'admin'>
		  <tr>
			<td>
			  <span class="label">${tmp.id}</span>
			</td>
			<td>
			 ${tmp.company!""}
			</td>
			<td>
			  ${tmp.companyname!""}
			</td>
			<td>
			  <#if tmp.recharge_money??>
					￥${tmp.recharge_money?string(",##0.00#")}
				<#else>
					0.0
				</#if>
			</td>
			<td>
			  ${tmp.recharge_message!""}
			</td>
			<td>
			  ${tmp.recharge_message_user!"" }
			</td>
			<td>
				<div class="btn-group">
                    <#if session.userRole == 'admin'>
                    	<a class="cf" href="/company/toEditMessage/${tmp.id}"><i class="icon-info-sign icon-white"></i> 修改</a>
                        <a class="cf" href="/company/toAddRecharge/${tmp.id}"><i class="icon-info-sign icon-white"></i>充值信息录入</a>
                        <a class="cf" href="/company/toDedut/${tmp.id}"><i class="icon-info-sign icon-white"></i>扣款信息录入</a>
                    </#if>
                    <a class="cf" href="/company/history?id=${tmp.id}"><i class="icon-info-sign icon-white"></i>充值记录查看</a>
               		<a class="cf" href="/company/dedutHistory?id=${tmp.id}"><i class="icon-info-sign icon-white"></i>扣款记录查看</a>
				</div>
			</td>
		  </tr>
		</#if>
		</#list>
		</tbody>
	</table>  
	<#include "../common/paginate.ftl" />
	<@paginate currentPage=page.pageNumber totalPage=page.totalPage actionUrl="/company/"/>
</div>
</div>
          
</@layout>